<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/commons/taglibs.jsp"%>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<meta http-equiv="Cache-Control" content="no-store" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<link
	href="<c:url value="/widgets/jquery-ui-1.11.0/jquery-ui.min.css"/>"
	type="text/css" rel="stylesheet">
<link
	href="<c:url value="/widgets/jquery-ui-1.11.0/jquery-ui.theme.min.css"/>"
	type="text/css" rel="stylesheet">

<link href="<c:url value="/styles/style.css"/>" type="text/css"
	rel="stylesheet">
<link href="<c:url value="/styles/common/iconlib.css"/>" type="text/css"
	rel="stylesheet">
<link href="<c:url value="/styles/common/menutree.css"/>"
	type="text/css" rel="stylesheet">

<base href="<%=basePath%>">
<script type="text/javascript">
	var ctx = "${ctx}";
</script>
<rapid:block name="head" />

</head>
<body>
	<!-- start of header  -->
	<div id="header">
		<div class="logout">
			<c:choose>
				<c:when test="${empty login.userName }">
					<a href="login.jsp">登陆</a>
				</c:when>
				<c:otherwise> 			 
			 	欢迎，<a href="javascript:;" id="username">${login.userName}&nbsp;<i
						class="icon-caret-down"></i></a>&nbsp;&nbsp;|
        			<span id="clock"></span>
					<span> 
						<c:if test="${login.city == '2'}">地区:<span id="city_name">北京</span><input id="city_id" type="hidden" value="2"/></c:if>
				 		<c:if test="${login.city == '1000'}">地区:<span id="city_name">上海</span><input id="city_id" type="hidden" value="1000"/></c:if>
			 			<c:if test="${login.city == '2000'}">地区:<span id="city_name">天津</span><input id="city_id" type="hidden" value="2000"/></c:if>
					</span>
					<ul id="setting" class="dropdown-content">
						<li><a id="changePsdLink" href="javascript:void(0);"
							onclick="$('#changePsdBlock').modal('toggle');"><i
								class="icon-cog"></i>&nbsp;&nbsp;修改密码</a></li>
						<li><a href="${ctx}/account/logout"><i class="icon-reply"></i>&nbsp;&nbsp;退&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;出</a>
						</li>
					</ul>
				</c:otherwise>
			</c:choose>
		</div>
		<div class="content">
			<ul class="nav-header">
				<c:if
					test="${login.properties[global_authority_type.BASIC_ORDER_SHOW] == '1'}">
					<li class="order-nav"><a href="javascript:;" class="nobg">
							<i class="icon-file-alt icon-large"></i>&nbsp;&nbsp;订单维护
					</a>
						<ul class="sub-nav">
							<c:if
								test="${login.properties[global_authority_type.BASIC_ORDER_SHOW] == '1'}">
								<li class="sub-li"><a href="${ctx_base}/neworder"
									class="sub-a">订单管理 </a></li>
							</c:if>
							<c:if
								test="${login.properties[global_authority_type.BASIC_ORDER_CTRL] == '1'}">
								<li class="sub-li"><a href="${ctx_base}/newreturnorder"
									class="sub-a">售后管理</a></li>
							</c:if>
							<c:if
								test="${login.properties[global_authority_type.FINACIAL_ORDER_CTRL] == '1'}">
								<li class="sub-li"><a href="${ctx_base}/neworder/unsettled"
									class="sub-a">未回款订单 </a></li>
								<li class="sub-li"><a href="${ctx_base}/payment"
									class="sub-a">财务现金收款</a></li>
								<c:if test="${global_city_type == 'BJ'}">
									<li class="sub-li"><a href="${ctx_base}/payment/pos"
										target="_blank" class="sub-a">POS机收款记录</a></li>
								</c:if>
							</c:if>
						</ul></li>
				</c:if>
				<c:if
					test="${login.properties[global_authority_type.PD_PURCHASE_SHOW] == '1'||
login.properties[global_authority_type.PD_STOCK_SHOW] == '1'||
login.properties[global_authority_type.PD_SUPPLY_SHOW] == '1'}">
					<li class="erp-nav"><a href="javascript:;" class="nobg"> <i
							class="icon-inbox icon-large"></i>&nbsp;&nbsp;采供销管理
					</a>
						<ul class="sub-nav">
							<c:if
								test="${login.properties[global_authority_type.BASIC_ORDER_EXPORT] == '1'}">
								<li class="sub-li"><a
									href="${ctx_erp}/purchaseinfo/require" class="sub-a">每日需求列表
								</a></li>
							</c:if>
							<c:if test="${global_city_type == 'BJ'}">

								<c:if
									test="${login.properties[global_authority_type.PD_PURCHASE_SHOW] == '1'}">
									<li class="sub-li"><a href="${ctx_erp}/purchaseplan"
										class="sub-a">采购管理 </a></li>
								</c:if>
							</c:if>
							<c:if
								test="${login.properties[global_authority_type.PD_PURCHASE_SHOW] == '1'}">
								<li class="sub-li"><a href="${ctx_erp}/material"
									class="sub-a">原材料管理</a></li>
								<li class="sub-li"><a href="${ctx_erp}/materialtype"
									class="sub-a">原材料分类管理</a></li>

							</c:if>
							<c:if test="${global_city_type == 'BJ'}">
								<%--<c:if test="${login.properties[global_authority_type.PD_STOCK_SHOW] == '1'}">
								 <li class="sub-li"><a href="javascript:void(0);" class="sub-a">入库管理 </a>
									<ul class="subsub-nav">
										<li class="sub-li"> <a href="${ctx_erp}/godownentry" class="sub-a">采购入库 </a></li>
										<li class="sub-li"> <a href="${ctx_erp}/godownentry/listReturn" class="sub-a">退货入库 </a></li>
									</ul>
								</li> --%>
								<%-- <li class="sub-li"> <a href="javascript:void(0);" class="sub-a">出库管理 </a> 
									<ul class="subsub-nav">
										<li class="sub-li"> <a href="${ctx_erp}/outboundorder" class="sub-a">商品出库 </a></li>
										<li class="sub-li"> <a href="${ctx_erp}/lossorder" class="sub-a">损耗出库 </a></li>
									</ul>
								</li> 
							</c:if> --%>
								<c:if
									test="${login.properties[global_authority_type.PD_SUPPLY_SHOW] == '1'}">
									<li class="sub-li"><a href="javascript:void(0);"
										class="sub-a">供应商管理 </a>
										<ul class="subsub-nav">
											<li class="sub-li"><a href="${ctx_erp}/supplier"
												class="sub-a">供应商信息 </a></li>
											<li class="sub-li"><a href="${ctx_erp}/supplierorder"
												class="sub-a">供应商账单 </a></li>
										</ul></li>
								</c:if>
							</c:if>
						</ul></li>
				</c:if>
					<c:if test="${login.properties[global_authority_type.commodity_colon_index] == '1' || login.properties[global_authority_type.commodity_colon_query] == '1' ||
					login.properties[global_authority_type.commodity_colon_export] == '1' || login.properties[global_authority_type.commodity_colon_history_index] == '1' ||
					login.properties[global_authority_type.tender_colon_index] == '1' || login.properties[global_authority_type.tender_colon_query] == '1' ||
					login.properties[global_authority_type.tender_colon_export] == '1' || login.properties[global_authority_type.tender_colon_history_index] == '1' ||
					login.properties[global_authority_type.dc_colon_index] == '1' || login.properties[global_authority_type.category_location_colon_index] == '1' ||
					login.properties[global_authority_type.rate_colon_index] == '1'}">
					<li class="stock-nav"><a href="javascript:;" class="nobg">
							<i class="icon-home icon-large"></i>&nbsp;&nbsp;仓储管理</a>
						<ul class="sub-nav">
						<c:if test="${login.properties[global_authority_type.commodity_colon_index] == '1'}">
							<li class="sub-li"><a href="wmscommodity" class="sub-a">商品流水信息</a></li>
						</c:if>
						<c:if test="${login.properties[global_authority_type.tally_colon_index] == '1'}">
							<li class="sub-li"><a href="wmstender" class="sub-a">标件商品库存</a></li>
						</c:if>
						
						<c:if test="${login.properties[global_authority_type.dc_colon_index] == '1' || 
							login.properties[global_authority_type.category_location_colon_index] == '1'}">
							<li class="sub-li"><a href="javascript:void(0)" 
							class="sub-a">仓库数据管理</a>
							<ul class="subsub-nav">
								<c:if test="${login.properties[global_authority_type.dc_colon_index] == '1'}">
									<li class="sub-li"><a href="wmsdc" class="sub-a">配送中心管理</a></li>
								</c:if>
								<c:if test="${login.properties[global_authority_type.category_location_colon_index] == '1'}">
									<li class="sub-li"><a href="wmsstockinit/createCategoryStockInit" class="sub-a">商品货位管理</a></li>
								</c:if>
							</ul>
							</li>
						</c:if>
						
						<c:if test="${login.properties[global_authority_type.rate_colon_index] == '1'}">
							<li class="sub-li"><a href="rate" class="sub-a">毛利率</a></li>
						</c:if>
						</ul>
					</li>
				</c:if>
				<%-- <c:if test="${login.properties[global_authority_type.dc_colon_index] == '1' || login.properties[global_authority_type.category_location_colon_index] == '1' ||
					login.properties[global_authority_type.purchase_instock_colon_index] == '1' || login.properties[global_authority_type.return_instock_colon_index] == '1' ||
					login.properties[global_authority_type.pack_colon_index] == '1' ||
					login.properties[global_authority_type.tally_colon_index] == '1' ||
					login.properties[global_authority_type.putaway_colon_index] == '1' || 
					login.properties[global_authority_type.stockinit_colon_index] == '1' || login.properties[global_authority_type.stock_colon_index] == '1' || 
					login.properties[global_authority_type.inventory_colon_index] == '1' ||
					login.properties[global_authority_type.outboundorder_colon_index] == '1' || login.properties[global_authority_type.lossorder_colon_index] == '1' || login.properties[global_authority_type.notputawayloss_colon_index] == '1' ||
					login.properties[global_authority_type.rate_colon_index] == '1'}">
					<li class="stock-nav"><a href="javascript:;" class="nobg">
							<i class="icon-home icon-large"></i>&nbsp;&nbsp;仓储管理</a>
							
						<ul class="sub-nav">
						<c:if test="${login.properties[global_authority_type.purchase_instock_colon_index] == '1' ||
							login.properties[global_authority_type.return_instock_colon_index] == '1'}">
							<li class="sub-li"><a href="javascript:void(0);" class="sub-a">入库 </a>
								<ul class="subsub-nav">
								<c:if test="${login.properties[global_authority_type.purchase_instock_colon_index] == '1'}">
									<li class="sub-li"><a href="godownentry" class="sub-a">采购入库</a></li>
								</c:if>
								<c:if test="${login.properties[global_authority_type.return_instock_colon_index] == '1'}">
									<li class="sub-li"><a href="godownentry/listReturn"class="sub-a">退货/盘库入库 </a></li>
								</c:if>
								</ul>
							</li>
						</c:if>
						
						<c:if test="${login.properties[global_authority_type.pack_colon_index] == '1'}">
							<li class="sub-li"><a href="wmspack" class="sub-a">打包</a></li>
						</c:if>
						<c:if test="${login.properties[global_authority_type.tally_colon_index] == '1'}">
							<li class="sub-li"><a href="wmstally" class="sub-a">理货</a></li>
						</c:if>
						<c:if test="${login.properties[global_authority_type.putaway_colon_index] == '1'}">
							<li class="sub-li"><a href="wmsputaway" class="sub-a">上架</a></li>
						</c:if>
						
						<c:if test="${login.properties[global_authority_type.outboundorder_colon_index] == '1' ||
							login.properties[global_authority_type.lossorder_colon_index] == '1' || 
							login.properties[global_authority_type.notputawayloss_colon_index] == '1'}">
							<li class="sub-li"><a href="javascript:void(0);"
								class="sub-a">出库 </a>
								<ul class="subsub-nav">
								<c:if test="${login.properties[global_authority_type.outboundorder_colon_index] == '1'}">
									<li class="sub-li"><a href="outboundorder" class="sub-a">商品出库</a></li>
								</c:if>
								<c:if test="${login.properties[global_authority_type.lossorder_colon_index] == '1'}">
									<li class="sub-li"><a href="lossorder" class="sub-a">损耗出库</a></li>
								</c:if>
								<c:if test="${login.properties[global_authority_type.notputawayloss_colon_index] == '1'}">
									<li class="sub-li"><a href="wmsnotputawayloss" class="sub-a">未上架损耗</a></li>
								</c:if>
								</ul>
							</li>
						</c:if>
						
						<c:if test="${login.properties[global_authority_type.stock_colon_index] == '1' ||
							login.properties[global_authority_type.stockinit_colon_index] == '1'}">
							<li class="sub-li"><a href="javascript:void(0)"
								class="sub-a">库存</a>
								<ul class="subsub-nav">
								<c:if test="${login.properties[global_authority_type.stock_colon_index] == '1'}">
									<li class="sub-li"><a href="wmsstock" class="sub-a">库存管理</a></li>
								</c:if>
								<c:if test="${login.properties[global_authority_type.stockinit_colon_index] == '1'}">
									<li class="sub-li"><a href="wmsstockinit/createStockInit" class="sub-a">库存初始化录入</a></li>
								</c:if>
								</ul>
							</li>
						</c:if>
						
						<c:if test="${login.properties[global_authority_type.inventory_colon_index] == '1'}">
							<li class="sub-li"><a href="wmsinventory" class="sub-a">盘库</a></li>
						</c:if>
						
						<c:if test="${login.properties[global_authority_type.dc_colon_index] == '1' || 
							login.properties[global_authority_type.category_location_colon_index] == '1'}">
							<li class="sub-li"><a href="javascript:void(0)" 
							class="sub-a">仓库数据管理</a>
							<ul class="subsub-nav">
								<c:if test="${login.properties[global_authority_type.dc_colon_index] == '1'}">
									<li class="sub-li"><a href="wmsdc" class="sub-a">配送中心管理</a></li>
								</c:if>
								<c:if test="${login.properties[global_authority_type.category_location_colon_index] == '1'}">
									<li class="sub-li"><a href="wmsstockinit/createCategoryStockInit" class="sub-a">商品货位管理</a></li>
								</c:if>
							</ul>
							</li>
						</c:if>
						
						<c:if test="${login.properties[global_authority_type.rate_colon_index] == '1'}">
							<li class="sub-li"><a href="rate" class="sub-a">毛利率</a></li>
						</c:if>
						</ul>
					</li>
				</c:if> --%>


				<c:if
					test="${login.properties[global_authority_type.BASIC_CATEGORY_SHOW] == '1'||
login.properties[global_authority_type.BASIC_CATEGORYTYPE_SHOW] == '1'}">
					<li class="category-nav"><a href="javascript:;" class="nobg">
							<i class="icon-flag icon-large"></i>&nbsp;&nbsp;商品管理
					</a>
						<ul class="sub-nav">
							<c:if
								test="${login.properties[global_authority_type.BASIC_CATEGORY_SHOW] == '1'}">
								<li class="sub-li"><a href="${ctx_base}/category"
									class="sub-a">商品管理 </a></li>
								<li class="sub-li"><a href="${ctx_base}/categorytype"
									class="sub-a">商品分类管理 </a></li>
							</c:if>
						</ul></li>
				</c:if>
				<c:if
					test="${login.properties[global_authority_type.BASIC_AREA_MANAGER] == '1'}">
					<li class="logistics-nav"><a href="javascript:;" class="nobg">
							<i class="icon-truck icon-large"></i>&nbsp;&nbsp;物流管理
					</a>
						<ul class="sub-nav">
							<c:if
								test="${login.properties[global_authority_type.BASIC_AREA_MANAGER] == '1'}">
								<li class="sub-li"><a href="${ctx_base}/newareadict"
									class="sub-a">配送区域管理</a></li>
								<!-- <li class="sub-li"> <a href="route" class="sub-a">配送员跟踪 </a> </li> -->
							</c:if>
						</ul></li>
				</c:if>
				<c:if
					test="${login.properties[global_authority_type.BASIC_RESTAURANT_SHOW] == '1'}">
					<li class="staff-nav"><a href="javascript:;" class="nobg">
							<i class="icon-user icon-large"></i>&nbsp;&nbsp;会员管理
					</a>
						<ul class="sub-nav">
							<c:if
								test="${login.properties[global_authority_type.BASIC_RESTAURANT_SHOW] == '1'}">
								<li class="sub-li"><a href="${ctx_base}/restaurant"
									class="sub-a">会员管理 </a></li>
							</c:if>
							<c:if
								test="${login.properties[global_authority_type.ADMIN_USER_SHOW] == '1'}">
								<li class="sub-li"><a href="${ctx_base}/employee"
									class="sub-a">员工管理 </a></li>
							</c:if>
						</ul></li>
				</c:if>
				<c:if
					test="${login.properties[global_authority_type.BOARD_USER_LOGIN] == '1'||
                login.properties[global_authority_type.CRM_ADMIN_LOGIN] == '1'||
                login.properties[global_authority_type.BASIC_ORDER_FINACIAL] == '1'
                }">

					<li class="data-nav"><a href="javascript:;" class="nobg">
							<i class="icon-dashboard icon-large"></i>&nbsp;&nbsp;数据报表
					</a>
						<ul class="sub-nav">
							<c:if
								test="${login.properties[global_authority_type.BOARD_USER_LOGIN] == '1'}">
								<li class="sub-li"><a href="${ctx_base}/bi" class="sub-a">Business
										Intelligence</a>
							</c:if>
							<li class="sub-li"><a href="${ctx_base}/fastreport/tofind"
								class="sub-a">数据统计</a></li>
						</ul></li>
				</c:if>
			</ul>

		</div>
	</div>
	<!-- end of header -->

	<%@ include file="/commons/messages.jsp"%>

	<!-- start of main -->
	<div id="main">
		<!-- start of content -->
		<div class="content">
			<rapid:block name="content" />
		</div>
	</div>
	<!-- 修改密码  -->
	<div class="modal fade" id="changePsdBlock">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<h4 class="modal-title">修改密码</h4>
				</div>
				<div class="modal-body">
					<form id="changePsdForm" class="form-horizontal" role="form">
						<div id="changePsdResult" class="alert alert-danger"
							style="display:none;" role="alert"></div>
						<input type="hidden" name="accountId" value="${login.accountId}">
						<div class="form-group">
							<label for="oldPassword" class="col-sm-2 control-label">原密码</label>
							<input type="password" class="form-field col-3" id="oldPassword"
								placeholder="请输入原密码"> <span class="prompt"></span>
						</div>
						<div class="form-group">
							<label for="newPassword" class="col-sm-2 control-label">新密码</label>
							<input type="password" class="form-field col-3" id="newPassword"
								placeholder="输入新密码  6~10位数字或字母"> <span class="prompt"></span>
						</div>
						<div class="form-group">
							<label for="rePassword" class="col-sm-2 control-label">确认密码</label>
							<input type="password" class="form-field col-3" id="rePassword"
								placeholder="请重新输入新密码"> <span class="prompt"></span>
						</div>
					</form>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-primary"
						onclick="comfirmChangePsd(this);">确认保存</button>
					<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
				</div>
			</div>
			<!-- /.modal-content -->
		</div>
		<!-- /.modal-dialog -->
	</div>
	<!-- /.modal -->
	<!-- 返回顶部 -->
	<div id="toolBackTop" style="display:none;" class="gotop">
		<i class="icon icon-chevron-up"></i> <a href="javascript:;"
			title="回到顶部"> 返回<br>顶部
		</a>
	</div>
</body>

<script src="<c:url value="/scripts/jquery.js"/>" type="text/javascript"></script>
<script
	src="<c:url value="/widgets/jquery-ui-1.11.0/jquery-ui.min.js"/>"
	type="text/javascript"></script>
<script src="<c:url value="widgets/bootstrap.min.js"/>"
	type="text/javascript"></script>
<script src="<c:url value="widgets/pikaday.min.js"/>"
	type="text/javascript"></script>
<script language="javascript"
	src="<c:url value="scripts/common/function.js"/>"></script>
<script language="javascript"
	src="<c:url value="widgets/jquery.iDialog.min.js"/>"></script>

<rapid:block name="script" />
<script type="text/javascript">
	$(document).ready(function() {
		$(".sub-nav").dropDownMenu();
		$(".subsub-nav").dropSideMenu();
	});
</script>
</html>
